<script setup>
import { ref } from 'vue';
// 列表
const list = ref(['关注', '热点', '美食汇', '去哪玩', '衣食住行']);
// 索引
const index = ref(4);

// 获取最新的索引
const onActiveChange = (activeIndex) => {
  // console.log(activeIndex);
  index.value = activeIndex;
};
</script>

<template>
  <view class="container">
    <custom-tabs @activeChange="onActiveChange" :list="list" :activeIndex="index"></custom-tabs>
  </view>
</template>

<style lang="scss">
.container {
  // width: 500rpx;
  height: 500rpx;
  // background-color: skyblue;
}
</style>
